package com.hamster.tools.i18nManger.commands
{
	import com.hamster.tools.i18nManger.model.TranslateConfVOProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class TranslateCommand extends SimpleCommand
	{
		public function TranslateCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			var proxy:TranslateConfVOProxy = facade.retrieveProxy(TranslateConfVOProxy.NAME) as TranslateConfVOProxy;
			
			var body:Object = notification.getBody();
			var text:String = body.text;
			var from:String = body.from;
			var to:String = body.to;
			proxy.translate(text, from, to);
		}
		
	}
}